#ifndef __PWM_PIN_H
#define __PWM_PIN_H

// 一共有16个可选的PWM通道
//                // LEDC Chan to Group/Channel/Timer Mapping
typedef enum{
    PWM_CH_0 = 0, // ledc: 0  => Group: 0, Channel: 0, Timer: 0
    PWM_CH_1,     // ledc: 1  => Group: 0, Channel: 1, Timer: 0
    PWM_CH_2,     // ledc: 2  => Group: 0, Channel: 2, Timer: 1
    PWM_CH_3,     // ledc: 3  => Group: 0, Channel: 3, Timer: 1
    PWM_CH_4,     // ledc: 4  => Group: 0, Channel: 4, Timer: 2
    PWM_CH_5,     // ledc: 5  => Group: 0, Channel: 5, Timer: 2
    PWM_CH_6,     // ledc: 6  => Group: 0, Channel: 6, Timer: 3
    PWM_CH_7,     // ledc: 7  => Group: 0, Channel: 7, Timer: 3
    PWM_CH_8,     // ledc: 8  => Group: 1, Channel: 0, Timer: 0
    PWM_CH_9,     // ledc: 9  => Group: 1, Channel: 1, Timer: 0
    PWM_CH_10,    // ledc: 10 => Group: 1, Channel: 2, Timer: 1
    PWM_CH_11,    // ledc: 11 => Group: 1, Channel: 3, Timer: 1
    PWM_CH_12,    // ledc: 12 => Group: 1, Channel: 4, Timer: 2
    PWM_CH_13,    // ledc: 13 => Group: 1, Channel: 5, Timer: 2
    PWM_CH_14,    // ledc: 14 => Group: 1, Channel: 6, Timer: 3
    PWM_CH_15     // ledc: 15 => Group: 1, Channel: 7, Timer: 3
}PWM_Channle;

// 占空比分辨率，2的N次方
typedef enum
{
    PWM_Bit_1  = 0x01,  
    PWM_Bit_2  = 0x02, 
    PWM_Bit_3  = 0x03,  
    PWM_Bit_4  = 0x04, 
    PWM_Bit_5  = 0x05,  
    PWM_Bit_6  = 0x06, 
    PWM_Bit_7  = 0x07, 
    PWM_Bit_8  = 0x08,  
    PWM_Bit_9  = 0x09,  
    PWM_Bit_10 = 0x0A,  
    PWM_Bit_11 = 0x0B,  
    PWM_Bit_12 = 0x0C, 
    PWM_Bit_13 = 0x0D, 
    PWM_Bit_14 = 0x0E,  
    PWM_Bit_15 = 0x0F,  
    PWM_Bit_16 = 0x10
} PWM_Bit;

#endif
